home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2010 April
/
PCWorld0410.iso
/
hity wydania
/
Ubuntu 9.10 PL
/
karmelkowy-koliberek-desktop-9.10-i386-PL.iso
/
casper
/
filesystem.squashfs
/
etc
/
network
/
if-up.d
/
avahi-autoipd
next >
Wrap
Text File
|
2009-10-18
|
892b
|
36 lines
#!/bin/sh
set -e
# Description: Add routes to allow communication between machines which
# only have an IPv4LL address assigned and those which only
# have a routable address assigned.
#
# See http://developer.apple.com/qa/qa2004/qa1357.html for
# more information.
[ "$IFACE" != "lo" ] || exit 0
case "$ADDRFAM" in
inet|NetworkManager) ;;
*) exit 0
esac
case "$METHOD" in
static|dhcp|NetworkManager) ;;
*) exit 0
esac
if [ -x /bin/ip ]; then
# route already present?
ip route show | grep -q '^169.254.0.0/16[[:space:]]' && exit 0
/bin/ip route add 169.254.0.0/16 dev $IFACE metric 1000 scope link
elif [ -x /sbin/route ]; then
# route already present?
/sbin/route -n | egrep -q "^169.254.0.0[[:space:]]" && exit 0
/sbin/route add -net 169.254.0.0 netmask 255.255.0.0 dev $IFACE metric 1000
fi